home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
bbs
/
basement.zip
/
USRLST2.ZIP
/
USRLST2.MEX
next >
Wrap
Text File
|
1996-06-06
|
4KB
|
138 lines
//////////////////////////////////////////////////////////////////////////
//
// File: USRLST2.MEX
//
// Desc: Displays the user list
//
// Code: Portions <C>1995 by Lanius Corporation. All rights reserved.
//
// Amendments - Copyright (c)1995 - G. Foley & Basement Programs Ltd.
// Data Warehouse BBS - Fidonet 1:244/333 (905) 578-5117
//
// Released as Shareware - NOV 5, 1995
//////////////////////////////////////////////////////////////////////////
#include <max.mh>
int substrtoi(ref string: s, int: start, int: len)
{
string: t;
t:=substr(s,start,len);
return strtoi(t);
}
void main()
{
int: ok, count, len;
char: nonstop;
string: match;
struct _usr: u;
struct _stamp: cur; // Current date/time
int: cur_day; // Binary day of birth
int: cur_month; // Binary month of birth
int: dob_day; // Binary day of birth
int: dob_month; // Binary month of birth
reset_more(nonstop);
print(AVATAR_CLS, COL_YELLOW,
" User Search/Listing V1.1\n\n");
print(COL_WHITE "\nTotal number of users on file ",
COL_YELLOW "= " COL_LGREEN, userfilesize(), "\n\n" COL_WHITE);
print(COL_WHITE "Press " COL_GREEN "<" COL_YELLOW "enter" COL_GREEN,
">" COL_WHITE " for " COL_YELLOW "All" COL_WHITE ", or Type a ",
COL_LGREEN "Partial" COL_WHITE " name to match" COL_LMAGENTA,
": " COL_YELLOW );
len := input_str(match, INPUT_NLB_LINE, 0, 26,"");
if (len > 0)
match := strupper(match);
else
match :="";
print('\n');
print(COL_YELLOW, "──────────────────────────────┬─────────┬",
"───────────────────┬─────┬─────┬──────",COL_WHITE "\n");
print(COL_WHTONBLU " User Name ",
COL_YELLOW,"│",COL_WHTONBLU,"Last Call",COL_YELLOW,"│",
COL_WHTONBLU," Location ",COL_YELLOW,"│",
COL_WHTONBLU,"Uld's",COL_YELLOW,"│",COL_WHTONBLU,"Dld's",
COL_YELLOW,"│",COL_WHTONBLU," Calls",COL_WHITE "\n");
print(COL_YELLOW "──────────────────────────────┼─────────┼",
"───────────────────┼─────┼─────┼──────",COL_WHITE "\n");
count := 0;
for (ok := userfindopen("", "", u);
ok AND do_more(nonstop, COL_CYAN);
ok := userfindnext(u))
{
if (u.noulist = FALSE AND
(len = 0 OR len > 0 AND strfind(strupper(u.name), match) > 0))
{
count := count + 1;
if (u.priv > 65000)
print(COL_LBLUE, 'H');
else
print(' ');
if (u.encrypted = TRUE)
print(COL_LRED, 'E');
else
print(' ');
if (u.permanent = TRUE)
print(COL_LRED, 'P');
else
print(' ');
if (u.nerd = TRUE)
print(COL_LCYAN, 'N');
else
print(' ');
timestamp(cur);
cur_month:=cur.date.month;
cur_day:=cur.date.day;
dob_month:=substrtoi(u.dob,6,2);
dob_day:=substrtoi(u.dob,9,2);
if (cur_month=dob_month and cur_day=dob_day)
print(COL_LGREEN, '+');
else
print(COL_GREEN, '-');
if (u.badlogon = TRUE)
print(COL_LRED AVATAR_CLEOL,strpad(u.name,25,'.'));
else
if (u.deleted = TRUE)
print(COL_RED AVATAR_CLEOL,strpad(u.name,25,'.'));
else
if (u.sex = SEX_MALE)
print(COL_LCYAN AVATAR_CLEOL,strpad(u.name,25,'.'));
else
if (u.sex = SEX_FEMALE)
print(COL_LMAGENTA AVATAR_CLEOL,strpad(u.name,25,'.'));
else
print(COL_GRAY AVATAR_CLEOL,strpad(u.name,25,'.'));
// print (' ');
print(COL_YELLOW, "│",COL_CYAN,
strpad(substr(stamp_string(u.ludate),1,9), 9, ' '),
COL_YELLOW,"│", COL_GREEN, strpad(substr(u.city,1,19),19,' '),
COL_YELLOW,"│",COL_GRAY," ");
if (u.nup < 1 )
print(COL_LRED,strpad(uitostr(u.nup),4,' '), COL_YELLOW,
"│",COL_GRAY," ");
else print(COL_GREEN,strpad(uitostr(u.nup),4,' '), COL_YELLOW,
"│",COL_GRAY," ");
print(COL_LBLUE,strpad(uitostr(u.ndown),4,' '), COL_YELLOW,
"│",COL_GRAY," ", COL_LGREEN,strpad(uitostr(u.times),5,' '),
COL_YLWONBLU, );
print(COL_GRAY, "\n");
}
}
print(COL_YELLOW "──────────────────────────────┴─────────┴",
"───────────────────┴─────┴─────┴───────",COL_GRAY,"\n\n");
print(COL_YELLOW "Total matches found", COL_WHITE ,": ", COL_LGREEN,
count,COL_GRAY, "\n");
print(COL_WHITE,"Press ",COL_GREEN,"<",COL_YELLOW,"Enter",COL_GREEN,
">",COL_WHITE," to Continue.....");
len := input_str(match, INPUT_NLB_LINE, 0, 1,"");
}